package com.zhigongtech.core.web.util;

import java.util.Locale;

import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Component;

@Component
public class LocaleStringUtil extends SpringContextHolder {  

    public static String getMessage(String key){
    	Locale locale = LocaleContextHolder.getLocale();
    	return getApplicationContext().getMessage(key, null, locale);
    }
    

    public static String getMessage(String key, Object param[]){
    	Locale locale = LocaleContextHolder.getLocale();
    	return getApplicationContext().getMessage(key, param, locale);
    }

}  
